#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 2e5 + 5;

int n;
ll m[N], x[N];
ll calc(ll x) {
  ll res = ((x + 1) >> 1) & 1;
  per(i, 55, 1) {
    ll mask = 1ll << i;
    if (x & mask) {
      x ^= mask;
      if ((x + 1) & 1) res |= mask;
    }
  }
  return res;
}
void solve() {
  cin >> n;
  rep(i, 1, n) cin >> x[i] >> m[i];
  ll res = 0;
  rep(i, 1, n) res ^= calc(x[i] + m[i] - 1) ^ calc(x[i] - 1);
  if (res)
    cout << "tolik" << endl;
  else
    cout << "bolik" << endl;
  return;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int t;
  t = 1;
  while (t--) solve();
  return 0;
}